<?php


class db_connect
{
	private $maconnexion;
	
	
	public function  __construct() 
	{
		$url = "mysql:host=localhost;dbname=monitor";
		$user ="root";
		$mdp = "";
		$this->maconnexion = new PDO( $url, $user,$mdp );
	}

	/*public function connexion ()
	{
			$url = "mysql:host=localhost;dbname=monitor";
			$user ="root";
			$mdp = "";
			$this->maconnexion = new PDO( $url, $user,$mdp );
	}
	*/
	public function deconnexion ()
	{
		if (connection_aborted())
		{
			$this->maconnexion.mysql_close();
		}
	}

	public function getMaconnexion ()
	{
		return $this->maconnexion;
	}

}
